package com.flow.service;

import java.util.List;
import com.flow.model.PagerModel;
import com.flow.model.PermissionMenu;

/**
 * 角色菜单 服务接口
 * @author wang
 * @2015-12-25
 * IPermissionMenuService.java
 *
 */
public interface IPermissionMenuService<T> {

	/**
	 * 添加
	 * @param pm
	 * @return
	 */
	public boolean insertPermissionMenu(PermissionMenu pm);
	
	/**
	 * 更新
	 * @param pm
	 * @return
	 */
	public boolean updatePermissionMenu(PermissionMenu pm);
	
	/**
	 * 删除
	 * @param pm
	 * @return
	 */
	public boolean deletePermissionMenu(PermissionMenu pm);
	
	/**
	 * 根据ID删除
	 * @param id
	 * @return
	 */
	public boolean deletePermissionMenu(String id);
	
	/**
	 * 根据ID查询
	 * @param id
	 * @return
	 */
	public PermissionMenu findPermissionMenuById(String id);
	
	/**
	 * 查询全部
	 * @return
	 */
	public List<T> findAllPermissionMenu();
	
	/**
	 * 获取分页对象
	 * @return
	 */
	public PagerModel findAllPermissionMenuByPager();
	
	/**
	 * 验证namespace
	 * @param namespace
	 * @return
	 */
	public boolean vlidateNamespace(String namespace);
	
	/**
	 * 验证name
	 * @param name
	 * @return
	 */
	public boolean vlidateName(String name);
	
}
